import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Scanner;

/**
 * 输入一个int型整数，按照从右向左的阅读顺序，返回一个不含重复数字的新的整数。
 * Created by JiaJia on 2019/6/19 0019.
 */
public class HuaWei009 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            String str=scanner.nextLine();
            System.out.println(extractNumber(str));
        }
        scanner.close();
    }
    private static String extractNumber(String str){
        HashSet<Character> set=new LinkedHashSet<>();
        for (int i = str.length()-1; i >=0 ; i--) {
            set.add(str.charAt(i));
        }
        StringBuilder sb=new StringBuilder();
        for (Character ch:set) {
            sb.append(ch);
        }
        if (sb.charAt(0)=='0'){
            return sb.substring(1,sb.length());
        }
        return sb.toString();
    }
}